import api from './api'

/**
 * 使用手机 + 验证码登录
 */
export function userLogin(data) {
	return api.post('/login', data, {
		login: false
	})
}

/**
 * 使用手机 + 验证码登录  member/auth/send-sms-code
 */
export function smsSend(data) {
	return api.post('/member/auth/send-sms-code', data, {
		login: false
	})
}

/**
 * 小程序 member/auth/auth-miniapp-login         
 */
export function userLoginForWechatMini(data) {
	return api.post('/member/auth/auth-miniapp-login', data, {
		login: false
	})
}

/**
 * userAuthSession   
 */
export function userAuthSession(data) {
	return api.post('/member/auth/auth-session', data, {
		login: false
	})
}

/**
 * wechatAuth   
 */
export function getUserInfo(data) {
	return api.get('/system/user/profile', data, {
		login: false
	})
}
export function resisterUser(data) {
	return api.post('/registerOrderUser', data, {
		login: false
	})
}
export function getTreeData(data) {
	return api.get('/purchase/schoolRest/appSelectRest', data, {
		login: false
	})
}
export function getwxOpenId(data) {
	return api.get('/pay/getOpenid', data, {
		login: false
	})
}
export function cardUser(data) {
	return api.get("/cardServCenter/cardUser/getInfoForApp", data, {
		login: true
	})
}
export function bindCard(data) {
	return api.get("/cardServCenter/cardUser/appAddCardUser", data, {
		login: true
	})
}
export function lossCard(data) {

 return api.get('/cardServCenter/physicalCard/cardStateEditForApp', data, { login: true })
}
export function promotionRechargeInfo(data){
	return api.get('/cardServCenter/promotionRecharge/list',data,{login:true})
}
export function rechargePayByWx (data){
	return api.get('/cardServCenter/userRecharge/rechargePayByWx',data,{login:true})
}